{% extends 'common/layout.html' %}
{% load menu %}

{% block title %}
    {% block title_action %}NBRI{% endblock title_action %}-IT工单系统
{% endblock title %}

{% block css %}
    <!-- Bootstrap -->
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/css/jquery-ui.min.css" rel="stylesheet">
    <link href="/static/css/bootsnav.css" rel="stylesheet">
    <link href="/static/css/font-awesome.min.css" rel="stylesheet">
    <link href="/static/css/plugin.css" rel="stylesheet">
    <link href="/static/css/layout.css" rel="stylesheet">
    {% block css_other %}{% endblock css_other %}
{% endblock css %}

{% block js_head %}
    {% block js_head_other %}{% endblock js_head_other %}
{% endblock js_head %}

{% block body %}
    <nav class="navbar navbar-default navbar-static-top navbar-mobile bootsnav on">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-menu">
            <i class="fa fa-bars"></i>
          </button>
          <a class="navbar-brand" href="/">IT工单系统</a>
        </div>
        <div class="navbar-collapse collapse" id="navbar-menu">

            {% show_menu %}

          <form class="navbar-form navbar-right" method="get" action="{% url 'it_task:list' %}">
            <div class="form-group">
              <input type="text" name="keyword" value="{{ query.keyword }}"
                     placeholder="工单号/问题/姓名/电话" class="form-control">
            </div>
            <button type="submit" class="btn btn-success">查询工单</button>
          </form>
          <ul class="nav navbar-nav navbar-right">
              {% if request.user.is_authenticated %}
                <li><a>欢迎您,
                    <span style="font-size: 14px;font-weight: bold;">
                        {{ request.user.last_name }}{{ request.user.first_name }}
                    </span></a>
                </li>
                <li><a style="color: #006dcc" href="{% url 'it_task:logout' %}">注销</a></li>
              {% else %}
                <li><a>欢迎您!</a></li>
              {% endif %}
          </ul>

        </div><!--/.navbar-collapse -->
      </div>
    </nav>

    {% block content %}
    <div class="container">
        <div class="jumbotron">
        <h1>IT工单系统</h1>
        <p>本系统旨在提供工单跟进为目的, 提供跟好的体验, 同时为工程师自动生成日工作记录和周月报.</p>
        <p>系统导航菜单在左上角.</p>
        <p>
          <a class="btn btn-lg btn-success" href="{% url 'it_task:add' %}" role="button">提报 »</a>
          <a class="btn btn-lg btn-primary" href="{% url 'it_task:list' %}" role="button">查看 »</a>
        </p>
      </div>
    </div> <!-- /container -->
    {% endblock content %}
{% endblock body %}

{% block js_bottom %}
    <script src="/static/js/jquery.min.js"></script>
    <script src="/static/js//bootstrap.min.js"></script>
    <script src="/static/js/jquery-ui.js"></script>
    <script src="/static/js/bootsnav.js"></script>
{#    <script src="/static/js/jquery-ui.min.js"></script>#}
    <script src="/static/js/common.js"></script>
    {% block js_bottom_other %}{% endblock js_bottom_other %}
{% endblock js_bottom %}